import { MidwayConfig } from '@midwayjs/core';
import { log } from 'console';
import mysql2 from 'mysql2'
import path from 'path'
const patgh11=path.resolve('./','./myEncryptedSQLiteDbFile.db');
log('patgh11',patgh11) 
export default {
  // use for cookie sign key, should change to your own and keep security
  keys: '1703843972674_4808',
  koa: {
    port: 7001,
  },
  typeorm: {
    dataSource: {
      default: {
        type: 'sqlite',
        database: patgh11,
        logging: true,
        entities: [
          '**/entity/*.entity{.ts,.js}'
        ]
      },
      szq_system: {
        type: 'mysql',
        driver: mysql2,
        host: '192.168.11.204',
        port: 13306,
        username: 'root',
        password: '15s6f9E3613f9k',
        database: 'szq_system',
        logging: true,
        entities: [
          '**/entity/*.entity{.ts,.js}'
        ]
      }
    }
  },

} as MidwayConfig;
